-
-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][MIG] - stock_auto_move #852
Conversation
…ional argument no_prepare
* The `_apply` method should not be overridden. In case of three step operation with the last step set to auto move. The override of the `_apply` method was causing the second move to be automatic as well. **Use case**: doing a reception operation in two steps where the moves on the second step are set to be automatic (using the push rule in this case), and the reception is done partially. **Expected Result**: When doing a first reception step partially a back order is created, and we expect the second step to have a back order for the remaining qty as well. **Current behavior**: The correct move is processed automatically but no backorder is created. The reason for that behavior is we processing the move directly (i.e calling `action_done` of the `stock.move`) without going through the normal process (i.e processing the second step picking). **The solution to the problem**: The processing the of the automatic stock move should follow the same behavior as done from the user interface. I've added a new function in `stock.picking` model called `_transfer_pickings_with_auto_move` to simulate the same behavior this function is called inside the `action_assign` of the stock move instead of calling the `action_done` of the move.
As in v>=12, stock.location.path and procurement.rule have been merged into stock.rule, use the same field name.
If moves were created with a particular procurment group, don't change it to automatic one. Do it only if it's void.
As unit of measure can be a different multiple than reference, use product_uom_qty instead.
If in a first picking, we transfer partially one quantity and say 'No backorder', the destination move should be split and cancelled for the remaining quantities if 'propagate_cancel' is set.
… (take2) In case of partial flows with move cancel and mixed moves (auto and manual), we need to create a backorder for manual quantities to not get a picking with moves with mixed states (done, cancel, assigned). We remove code that is never called on picking side
cc/ @rousseldenis |
adeec2f
to
5c6b046
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
This PR has the |
Congratulations, your PR was merged at eb28775. Thanks a lot for contributing to OCA. ❤️ |
FW #735